<div class="m-modal">
	<div class="m-modal-dialog">
		<div class="m-top">
			<h4 class="m-modal-title">
				提示
			</h4>
			<span class="m-modal-close">&times;</span>
		</div>
		<div class="m-middle">
			<!--content-->
			<p id="errorText"></p>
			
		</div>
		<div class="m-bottom">
			<button class="m-btn-sure">确定</button>
			<button class="m-btn-cancel">取消</button>
		</div>
	</div>
</div>
<div style="display:none;">
	@if(count($errors) > 0)
	@foreach($errors->all() as $error)
	<p class="error">{{$error}}</p>
	@endforeach
	@endif
	@if(Session::has('error'))
	<p class="error">{{Session::get('error')}}</p>
	@endif
</div>
<script>
	var errors = $(".error");
	var error_len = errors.length;
	if(error_len > 0) {
		var m1 = new MyModal.modal(function() {
		});
		var errorText = "";
		errorText = $(errors[0]).html();
		$("#errorText").html(errorText);
		m1.show();
	}	
</script>